package com.hhwy.frame.domain;



import com.hhwy.framework.annotation.PropertyDesc;
import com.hhwy.framework.persistent.entity.Domain;

import javax.persistence.*;
import java.io.Serializable;

@Entity(name="person")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name="person")
public class Person extends Domain implements Serializable
{

    @PropertyDesc("姓名")
    @Column(name="name", nullable=false, length=50)
    private String name;

    @PropertyDesc("年龄")
    @Column(name="age", nullable=false, length=50)
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Person() {
    }

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }
}
